<div class="_contro">
    <a href="/home/action/create?id=<?php echo $action['id'];?>&copy=1" class="_a"><font class="_font">复制该活动</font></a>&nbsp;&nbsp;
    <?php if($action['status']==1){?>
    <a href="/home/action/" class="_a"><font class="_font">返回</font></a>
    <?php }else{?>
    <a href="/home/action/release?action_id=<?php echo $action['id'];?>" onclick='' class="_a"><font class="_font maskLayer">发布</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="/home/action/info?id=<?php echo $action['id'];?>" class="_a"><font class="_font">返回</font></a>
    <?php }?>
    <div style=' position: relative;;left:-90px;top:100px;' ><p><img src="/public/images/barbercode.jpg" style='width:100px;height:100px;' ></p><p>成员登录二维码</p> </div>
    <div style=' position: relative;;left:-83px;top:140px;' ><p><img src="/home/action/qrcode?action_id=<?php echo $action['id'];?>&store_id=<?php echo $action['store_id'];?>" style='width:120px;height:120px;' ></p><p style='margin-right:20px;'>活动二维码</p> </div>
</div>
<div class='_cut'></div>
<div class="preview_div">
    <div class='box'>
        <h3><?php echo $action['action_name'] ;?></h3><h5><?php if($action['only']==1){ echo "(每人仅限购买一次，不可重复购买！)"; } ?></h5>
    </div>
    <div class='box'>
        <img src="/public/images/kaka.png" style="width:40rem;" id="_banner_"/>
        <br/>
    </div>
    <div class='_line'></div>

    <?php if( $action['model_type'] == 1 ){ ?>

            <!-- 拼团活动 遍历items start -->
            <div class='box'>
                <?php $ids = json_decode( $action['content'],true);$ids = $ids['ids']; ?>
                <?php foreach($items as $k=>$v){
                $image = explode('/',$v['images'][0]['image']);$_img = array_pop($image);$image = implode('/',$image)."/"."max_".$_img;
                ?>
                <link href="/public/css/action.css" rel="stylesheet">
                <div style="width:100%">
                    <div id="iSlider-effect-wrapper">
                        <div id="non-looping_<?php echo $v['id'];?>" class="iSlider-effect">
                            <img src="<?php echo 'http://'.IMAGE_DOMAIN_.$image;?>" style='width:100%;height:330px'/>
                        </div>
                    </div>
                </div>
                <div style="clear:both"></div>
                <div class="_cut2"></div>
                <div class="_line"></div>
                <div class="_cut2"></div>
                <div>
                    <span class='big_title' style="font-size:2rem"><b><?php echo $v['name'];?></b></span>&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class='small_title' style="color:#999"><?php echo $v['title'];?></span>
                </div>
                <div class='cut_3'></div>
                <div class='cut'></div>
                <div class='cut_3'></div>
                <div>
                    <span class='_price' style="color:red"><s>原价：￥<?php echo $v['price']/100;?></s></span>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class='_price' style="color:red">拼团价：￥<?php echo $ids[$v['id']]/100;?></span>
                </div>
                <div class='cut_3'></div>
                <div class='cut'></div>
                <div class='cut_3'></div>
                <?php if($v['is_meal_set']==1){ ?>
                <div class='set_content'>
                    套餐内容：<br/>
                    <?php foreach($v['meal_set_items'] as $kk=>$vv){ ?>
                    <a href="#" ><b><?php echo $vv['name'];?></b></a>&nbsp;&nbsp;&nbsp;<?php echo $vv['number'];?>&nbsp;个/次<br/>
                    <?php }?>
                </div>
                <div class='cut_3'></div>
                <div class='cut'></div>
                <?php }?>
                <div class='cut_3'></div>
                <div class='intro colors-size'>
                    活动详情：<?php echo $v['intro'];?>
                </div>
                <div class='cut_3'></div>
                <div class='cut'></div>
                <div class='cut_3'></div>
                <div class='_line'></div>
                <?php }?>
            </div>
            <!-- 拼团活动 遍历items end -->

    <?php }elseif( $action['model_type'] == 2 ){ ?>

            <!-- 拼颜值活动 start -->
            <div class='box'>
            <?php echo '奖项设置:</br>';
                    $action['content'] = json_decode($action['content'],true);
                    foreach($action['content']['content'] as $k=>$v){
                    if($k){
                    if($k == 'help'){
                    echo " <span style='padding-left:2rem;'> 助力优惠劵：<span >".$v."</span></span></br>";
                    }else{
                    echo " <span style='padding-left:2rem;'>前 <span style='color:red;'>".$k."</span>  名：<span >".$v."</span></span></br>";
                    }
                    }
                    }
            ?>
            </div>
            <!-- 拼颜值活动 end -->

    <?php }?>


    <div class='_line'></div>
    <span class='colors-size'><?php echo $action['intro'];?></span>
    <div class='_line'></div>
    <div class='_cut2'></div>
   
    <div class='box'>
        <span class='colors'>活动日期:</span>
        <span class='colors-size'><?php echo date("Y年m月d日",$action['start_time']);?>&nbsp;至&nbsp;<?php echo date("Y年m月d日",$action['end_time']);?></span>
        </br>
        <span class="colors">使用截止日期:</span>
        <span class='colors-size'><?php echo date("Y年m月d日",$action['use_end_time']);?></span>
    </div>
    <div class='box'>
        <span class='colors'>联系人:</span>
        <span class='colors-size'><?php echo $store['person_charge'];?></span>
    </div>
    <div class='box'>
        <span class='colors'>Tel:</span>
        <span class='colors-size'><?php echo $store['tel'];?></span>
    </div>
    <div class='box'>
        <img style='width:100%' src='http://apis.map.qq.com/ws/staticmap/v2/?center=<?php echo $store["latlng"];?>&zoom=13&size=600*300&maptype=roadmap&markers=size:large|color:0x4169e1|label:D|<?php echo $store["latlng"];?>&key=5LTBZ-Z6PC5-WAGIB-QXGAX-JBVBF-XQBTP'/>
    </div>
    <div class='box'>
        <span class='colors'>地址:</span>
        <span class='colors-size'><?php echo $store['address'];?></span>
    </div>
    <div class='_line'></div>
    <div class='box'>
        <input style="width:100%;height:4rem" type="text" value="" id="mobile" placeholder="请填写手机号"/>
    </div>
    <div class='_line3'></div>
        <div class='box'>
            <input style='width:60%;height:3rem' type="text" value="" id="_code" placeholder="请填验证码">
            &nbsp;&nbsp;&nbsp;<button type="button" id='subcode' style='width:30%'>获取验证码</button>
        </div>
    <div class='_line'></div>
    <?php if($action['model_type']==1){ ?>
    <div class='box'>
        <select style="width:100%;height:4rem" name="type" id="type">
            <?php foreach($action['content']['key'] as $v){
	if(strlen($v)>0){
            echo "<option value='".$v."'>".$v."</option>";
            }
            } ?>
        </select>
    </div>
    <?php } ?>
    <div class='box'>
        <button class="btn btn-primary btn-lg" type="button" style="width:49%;background-color:#FF79BC;border-color:white">我要参团</button>
        <button class="btn btn-primary btn-lg" type="button" style="width:49%;background-color:#FF79BC;border-color:white">我要开团</button>
    </div>
</div>

<script type="text/javascript">
    function create()
    {
        setTimeout(window.location.href="/home/action/update?action_id="+<?php echo $action['id']; ?>);
    }
</script>
